package cn.charlab.boot.s3.config;


import cn.charlab.boot.s3.S3Template;
import cn.charlab.boot.s3.properties.S3ConfigProperties;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;


@AutoConfiguration
@EnableConfigurationProperties(value = S3ConfigProperties.class)
public class S3ConfigAutoConfiguration {

    @Bean(destroyMethod = "destroy")
    public S3Template s3Template(S3ConfigProperties s3ConfigProperties){
        return new S3Template(s3ConfigProperties);
    }
}
